Optimal. Leaf size=116 \[ -\frac {1}{2} b^2 c x-\frac {1}{4} b^2 d x^2+\frac {a^2 (c+d x)^2}{2 d}+\frac {2 a b (c+d x) \cosh (e+f x)}{f}-\frac {2 a b d \sinh (e+f x)}{f^2}+\frac {b^2 (c+d x) \cosh (e+f x) \sinh (e+f x)}{2 f}-\frac {b^2 d \sinh ^2(e+f x)}{4 f^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.07, antiderivative size = 116, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 4, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {3398, 3377,
2717, 3391} \begin {gather*} \frac {a^2 (c+d x)^2}{2 d}+\frac {2 a b (c+d x) \cosh (e+f x)}{f}-\frac {2 a b d \sinh (e+f x)}{f^2}+\frac {b^2 (c+d x) \sinh (e+f x) \cosh (e+f x)}{2 f}-\frac {1}{2} b^2 c x-\frac {b^2 d \sinh ^2(e+f x)}{4 f^2}-\frac {1}{4} b^2 d x^2 \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2717
Rule 3377
Rule 3391
Rule 3398
Rubi steps
\begin {align*} \int (c+d x) (a+b \sinh (e+f x))^2 \, dx &=\int \left (a^2 (c+d x)+2 a b (c+d x) \sinh (e+f x)+b^2 (c+d x) \sinh ^2(e+f x)\right ) \, dx\\ &=\frac {a^2 (c+d x)^2}{2 d}+(2 a b) \int (c+d x) \sinh (e+f x) \, dx+b^2 \int (c+d x) \sinh ^2(e+f x) \, dx\\ &=\frac {a^2 (c+d x)^2}{2 d}+\frac {2 a b (c+d x) \cosh (e+f x)}{f}+\frac {b^2 (c+d x) \cosh (e+f x) \sinh (e+f x)}{2 f}-\frac {b^2 d \sinh ^2(e+f x)}{4 f^2}-\frac {1}{2} b^2 \int (c+d x) \, dx-\frac {(2 a b d) \int \cosh (e+f x) \, dx}{f}\\ &=-\frac {1}{2} b^2 c x-\frac {1}{4} b^2 d x^2+\frac {a^2 (c+d x)^2}{2 d}+\frac {2 a b (c+d x) \cosh (e+f x)}{f}-\frac {2 a b d \sinh (e+f x)}{f^2}+\frac {b^2 (c+d x) \cosh (e+f x) \sinh (e+f x)}{2 f}-\frac {b^2 d \sinh ^2(e+f x)}{4 f^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.42, size = 98, normalized size = 0.84 \begin {gather*} -\frac {2 \left (2 a^2-b^2\right ) (e+f x) (-2 c f+d (e-f x))-16 a b f (c+d x) \cosh (e+f x)+b^2 d \cosh (2 (e+f x))+16 a b d \sinh (e+f x)-2 b^2 f (c+d x) \sinh (2 (e+f x))}{8 f^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.93, size = 208, normalized size = 1.79
method | result | size |
risch | \(\frac {d \,a^{2} x^{2}}{2}+a^{2} c x -\frac {b^{2} d \,x^{2}}{4}-\frac {b^{2} c x}{2}+\frac {b^{2} \left (2 d x f +2 c f -d \right ) {\mathrm e}^{2 f x +2 e}}{16 f^{2}}+\frac {a b \left (d x f +c f -d \right ) {\mathrm e}^{f x +e}}{f^{2}}+\frac {a b \left (d x f +c f +d \right ) {\mathrm e}^{-f x -e}}{f^{2}}-\frac {b^{2} \left (2 d x f +2 c f +d \right ) {\mathrm e}^{-2 f x -2 e}}{16 f^{2}}\) | \(138\) |
derivativedivides | \(\frac {\frac {d \,a^{2} \left (f x +e \right )^{2}}{2 f}+\frac {2 d a b \left (\left (f x +e \right ) \cosh \left (f x +e \right )-\sinh \left (f x +e \right )\right )}{f}+\frac {d \,b^{2} \left (\frac {\left (f x +e \right ) \cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {\left (f x +e \right )^{2}}{4}-\frac {\left (\cosh ^{2}\left (f x +e \right )\right )}{4}\right )}{f}-\frac {d e \,a^{2} \left (f x +e \right )}{f}-\frac {2 d e a b \cosh \left (f x +e \right )}{f}-\frac {d e \,b^{2} \left (\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {f x}{2}-\frac {e}{2}\right )}{f}+a^{2} c \left (f x +e \right )+2 a b c \cosh \left (f x +e \right )+b^{2} c \left (\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {f x}{2}-\frac {e}{2}\right )}{f}\) | \(208\) |
default | \(\frac {\frac {d \,a^{2} \left (f x +e \right )^{2}}{2 f}+\frac {2 d a b \left (\left (f x +e \right ) \cosh \left (f x +e \right )-\sinh \left (f x +e \right )\right )}{f}+\frac {d \,b^{2} \left (\frac {\left (f x +e \right ) \cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {\left (f x +e \right )^{2}}{4}-\frac {\left (\cosh ^{2}\left (f x +e \right )\right )}{4}\right )}{f}-\frac {d e \,a^{2} \left (f x +e \right )}{f}-\frac {2 d e a b \cosh \left (f x +e \right )}{f}-\frac {d e \,b^{2} \left (\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {f x}{2}-\frac {e}{2}\right )}{f}+a^{2} c \left (f x +e \right )+2 a b c \cosh \left (f x +e \right )+b^{2} c \left (\frac {\cosh \left (f x +e \right ) \sinh \left (f x +e \right )}{2}-\frac {f x}{2}-\frac {e}{2}\right )}{f}\) | \(208\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.28, size = 173, normalized size = 1.49 \begin {gather*} \frac {1}{2} \, a^{2} d x^{2} - \frac {1}{16} \, {\left (4 \, x^{2} - \frac {{\left (2 \, f x e^{\left (2 \, e\right )} - e^{\left (2 \, e\right )}\right )} e^{\left (2 \, f x\right )}}{f^{2}} + \frac {{\left (2 \, f x + 1\right )} e^{\left (-2 \, f x - 2 \, e\right )}}{f^{2}}\right )} b^{2} d - \frac {1}{8} \, b^{2} c {\left (4 \, x - \frac {e^{\left (2 \, f x + 2 \, e\right )}}{f} + \frac {e^{\left (-2 \, f x - 2 \, e\right )}}{f}\right )} + a^{2} c x + a b d {\left (\frac {{\left (f x e^{e} - e^{e}\right )} e^{\left (f x\right )}}{f^{2}} + \frac {{\left (f x + 1\right )} e^{\left (-f x - e\right )}}{f^{2}}\right )} + \frac {2 \, a b c \cosh \left (f x + e\right )}{f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.34, size = 143, normalized size = 1.23 \begin {gather*} \frac {2 \, {\left (2 \, a^{2} - b^{2}\right )} d f^{2} x^{2} + 4 \, {\left (2 \, a^{2} - b^{2}\right )} c f^{2} x - b^{2} d \cosh \left (f x + \cosh \left (1\right ) + \sinh \left (1\right )\right )^{2} - b^{2} d \sinh \left (f x + \cosh \left (1\right ) + \sinh \left (1\right )\right )^{2} + 16 \, {\left (a b d f x + a b c f\right )} \cosh \left (f x + \cosh \left (1\right ) + \sinh \left (1\right )\right ) - 4 \, {\left (4 \, a b d - {\left (b^{2} d f x + b^{2} c f\right )} \cosh \left (f x + \cosh \left (1\right ) + \sinh \left (1\right )\right )\right )} \sinh \left (f x + \cosh \left (1\right ) + \sinh \left (1\right )\right )}{8 \, f^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.17, size = 219, normalized size = 1.89 \begin {gather*} \begin {cases} a^{2} c x + \frac {a^{2} d x^{2}}{2} + \frac {2 a b c \cosh {\left (e + f x \right )}}{f} + \frac {2 a b d x \cosh {\left (e + f x \right )}}{f} - \frac {2 a b d \sinh {\left (e + f x \right )}}{f^{2}} + \frac {b^{2} c x \sinh ^{2}{\left (e + f x \right )}}{2} - \frac {b^{2} c x \cosh ^{2}{\left (e + f x \right )}}{2} + \frac {b^{2} c \sinh {\left (e + f x \right )} \cosh {\left (e + f x \right )}}{2 f} + \frac {b^{2} d x^{2} \sinh ^{2}{\left (e + f x \right )}}{4} - \frac {b^{2} d x^{2} \cosh ^{2}{\left (e + f x \right )}}{4} + \frac {b^{2} d x \sinh {\left (e + f x \right )} \cosh {\left (e + f x \right )}}{2 f} - \frac {b^{2} d \cosh ^{2}{\left (e + f x \right )}}{4 f^{2}} & \text {for}\: f \neq 0 \\\left (a + b \sinh {\left (e \right )}\right )^{2} \left (c x + \frac {d x^{2}}{2}\right ) & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.43, size = 159, normalized size = 1.37 \begin {gather*} \frac {1}{2} \, a^{2} d x^{2} - \frac {1}{4} \, b^{2} d x^{2} + a^{2} c x - \frac {1}{2} \, b^{2} c x + \frac {{\left (2 \, b^{2} d f x + 2 \, b^{2} c f - b^{2} d\right )} e^{\left (2 \, f x + 2 \, e\right )}}{16 \, f^{2}} + \frac {{\left (a b d f x + a b c f - a b d\right )} e^{\left (f x + e\right )}}{f^{2}} + \frac {{\left (a b d f x + a b c f + a b d\right )} e^{\left (-f x - e\right )}}{f^{2}} - \frac {{\left (2 \, b^{2} d f x + 2 \, b^{2} c f + b^{2} d\right )} e^{\left (-2 \, f x - 2 \, e\right )}}{16 \, f^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.15, size = 135, normalized size = 1.16 \begin {gather*} \frac {a^2\,d\,x^2}{2}-\frac {b^2\,d\,x^2}{4}+a^2\,c\,x-\frac {b^2\,c\,x}{2}-\frac {b^2\,d\,{\mathrm {cosh}\left (e+f\,x\right )}^2}{4\,f^2}+\frac {b^2\,c\,\mathrm {cosh}\left (e+f\,x\right )\,\mathrm {sinh}\left (e+f\,x\right )}{2\,f}+\frac {2\,a\,b\,c\,\mathrm {cosh}\left (e+f\,x\right )}{f}-\frac {2\,a\,b\,d\,\mathrm {sinh}\left (e+f\,x\right )}{f^2}+\frac {2\,a\,b\,d\,x\,\mathrm {cosh}\left (e+f\,x\right )}{f}+\frac {b^2\,d\,x\,\mathrm {cosh}\left (e+f\,x\right )\,\mathrm {sinh}\left (e+f\,x\right )}{2\,f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________